package com.sv.utils.directive;

import java.io.IOException;
import java.io.Writer;

import org.apache.velocity.context.InternalContextAdapter;
import org.apache.velocity.exception.MethodInvocationException;
import org.apache.velocity.exception.ParseErrorException;
import org.apache.velocity.exception.ResourceNotFoundException;
import org.apache.velocity.runtime.directive.Directive;
import org.apache.velocity.runtime.parser.node.Node;

public class IfNull  extends Directive{

    @Override
    public String getName() {
        return "ifnull";
    }

    @Override
    public int getType() {
        return BLOCK;
    }

    @Override
    public boolean render(InternalContextAdapter arg0, Writer arg1, Node arg2)
            throws IOException, ResourceNotFoundException, ParseErrorException,
            MethodInvocationException {
        Object obj = arg2.jjtGetChild(0).value(arg0);
        return false;
    }

    
}
